package org.imast.actions;

import java.util.ArrayList;
import java.util.List;

import org.imast.models.ModelRequest;
import org.imast.services.ServiceRequest;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class ActionRequests extends ActionSupport implements ModelDriven<ModelRequest> {
	
	private ModelRequest request = new ModelRequest();
	private List<ModelRequest> listRequest = new ArrayList<ModelRequest>();
	private ServiceRequest serviceRequest = new ServiceRequest();
	
	public String getAll(){
		
		listRequest = serviceRequest.getAll();
		
		return SUCCESS;
		
	}
	
	public ModelRequest getRequest() {
		return request;
	}

	public void setRequest(ModelRequest request) {
		this.request = request;
	}

	public List<ModelRequest> getListRequest() {
		return listRequest;
	}

	public void setListRequest(List<ModelRequest> listRequest) {
		this.listRequest = listRequest;
	}

	@Override
	public ModelRequest getModel() {
		// TODO Auto-generated method stub
		return request;
	}

}
